package com.hywood.errorenum;

/**
 * Created By HuJian on 2018/7/19
 */
public enum ResultEnum {
    UNKONW_FALLBACK(-2,"服务降级"),
    UNKONW_ERROR(-1,"未知错误"),
    SUCCESS(0,"成功"),
    ERROR(1,"失败"),
    TOKEN_EMPTY(2,"Access Token 不能为空"),
    TOKEN_ERROR(3,"Access Token 不正确"),
    RATE_LIMIT(4,"服务限流"),
    ;

    private Integer code;
    private String msg;

    ResultEnum(Integer code,String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
